{extend name="base/common"}

{block name="style"}

{/block}

{block name="page-header"}

{/block}

{block name="main"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="mail-box-header">
                <h2>文件上传下达 / 公司发文</h2>
                <div class="mail-tools tooltip-demo m-t-md">
                    <input class="i-checks check-all" type="checkbox">
                    <button class="btn btn-danger btn-sm m-l ajax-post" url="{:Url('issuedMoveToTrash')}" data-toggle="tooltip" data-placement="top" target-form="ids"><i class="fa fa-trash-o"></i> 批量删除</button>
                    <a href="{:Url('News/issuedadd')}" class="btn btn-primary btn-sm" ><i class="fa fa-plus"></i> 添加</a>
                    <form method="get" action="" class="pull-right mail-search">
                        <div class="input-group">
                            <input type="text" class="form-control input-sm" name="search" placeholder="搜索标题">
                            <div class="input-group-btn">
                                <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i> 搜索</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="mail-box">
                <table class="table table-hover table-mail">
                    <thead>
                    <tr>
                        <th></th>
                        <th>标题</th>
                        <th>类型</th>
                        <th>发布人</th>
                        <th>浏览量</th>
                        <th>收藏数</th>
                        <th>发布时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>

                    <tbody>
                    {volist name="list" id="vo"}
                    <tr>
                        <td class="check-mail">
                            <input type="checkbox" class="i-checks ids" name="ids[]" value="{$vo.id}">
                        </td>
                        <td>{$vo.title|msubstr=0,20}</td>
                        <td>{$vo.type_text}</td>
                        <td>{$vo.publisher}</td>
                        <td>{$vo.views}</td>
                        <td>{$vo.collect}</td>
                        <td>{$vo.create_time|time_format='Y-m-d H:i'}</td>
                        <td>{eq name="vo.status" value="1"}已发布{else/}待定{/eq}</td>
                        <td>
                            <a href="{:Url('News/issuededit?id='.$vo['id'])}" class="confirm btn-sm btn-primary"><i class="fa fa-pencil"></i> 修改</a>
                            <a href="{:Url('News/issueddel?id='.$vo['id'])}" class="confirm btn-sm btn-danger ajax-del"><i class="fa fa-trash-o"></i> 删除</a>
                        </td>
                    </tr>
                    {/volist}
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="10">
                            <div class="page">{$list->render()}</div>
                        </td>
                    </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script src="/admin/js/plugins/iCheck/icheck.min.js"></script>
<script>
    highlight_subnav("{:Url('News/issued')}");

    $(document).ready(function(){
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
        $(".check-all").on("ifChanged",function(){
            $("tbody").find(".ids").iCheck("toggle");
        });
    });
</script>
{/block}